Optimal. Leaf size=193 \[ \frac {F_1\left (1-n;-m,1;2-n;-\frac {b \tan (e+f x)}{a},-i \tan (e+f x)\right ) (d \cot (e+f x))^n \tan (e+f x) (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}}{2 f (1-n)}+\frac {F_1\left (1-n;-m,1;2-n;-\frac {b \tan (e+f x)}{a},i \tan (e+f x)\right ) (d \cot (e+f x))^n \tan (e+f x) (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}}{2 f (1-n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 193, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {4326, 3656,
926, 140, 138} \begin {gather*} \frac {\tan (e+f x) (d \cot (e+f x))^n (a+b \tan (e+f x))^m \left (\frac {b \tan (e+f x)}{a}+1\right )^{-m} F_1\left (1-n;-m,1;2-n;-\frac {b \tan (e+f x)}{a},-i \tan (e+f x)\right )}{2 f (1-n)}+\frac {\tan (e+f x) (d \cot (e+f x))^n (a+b \tan (e+f x))^m \left (\frac {b \tan (e+f x)}{a}+1\right )^{-m} F_1\left (1-n;-m,1;2-n;-\frac {b \tan (e+f x)}{a},i \tan (e+f x)\right )}{2 f (1-n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 138
Rule 140
Rule 926
Rule 3656
Rule 4326
Rubi steps
\begin {align*} \int (d \cot (e+f x))^n (a+b \tan (e+f x))^m \, dx &=\left ((d \cot (e+f x))^n (d \tan (e+f x))^n\right ) \int (d \tan (e+f x))^{-n} (a+b \tan (e+f x))^m \, dx\\ &=\frac {\left ((d \cot (e+f x))^n (d \tan (e+f x))^n\right ) \text {Subst}\left (\int \frac {(d x)^{-n} (a+b x)^m}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left ((d \cot (e+f x))^n (d \tan (e+f x))^n\right ) \text {Subst}\left (\int \left (\frac {i (d x)^{-n} (a+b x)^m}{2 (i-x)}+\frac {i (d x)^{-n} (a+b x)^m}{2 (i+x)}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left (i (d \cot (e+f x))^n (d \tan (e+f x))^n\right ) \text {Subst}\left (\int \frac {(d x)^{-n} (a+b x)^m}{i-x} \, dx,x,\tan (e+f x)\right )}{2 f}+\frac {\left (i (d \cot (e+f x))^n (d \tan (e+f x))^n\right ) \text {Subst}\left (\int \frac {(d x)^{-n} (a+b x)^m}{i+x} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac {\left (i (d \cot (e+f x))^n (d \tan (e+f x))^n (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}\right ) \text {Subst}\left (\int \frac {(d x)^{-n} \left (1+\frac {b x}{a}\right )^m}{i-x} \, dx,x,\tan (e+f x)\right )}{2 f}+\frac {\left (i (d \cot (e+f x))^n (d \tan (e+f x))^n (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}\right ) \text {Subst}\left (\int \frac {(d x)^{-n} \left (1+\frac {b x}{a}\right )^m}{i+x} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac {F_1\left (1-n;-m,1;2-n;-\frac {b \tan (e+f x)}{a},-i \tan (e+f x)\right ) (d \cot (e+f x))^n \tan (e+f x) (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}}{2 f (1-n)}+\frac {F_1\left (1-n;-m,1;2-n;-\frac {b \tan (e+f x)}{a},i \tan (e+f x)\right ) (d \cot (e+f x))^n \tan (e+f x) (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}}{2 f (1-n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F]
time = 3.41, size = 0, normalized size = 0.00 \begin {gather*} \int (d \cot (e+f x))^n (a+b \tan (e+f x))^m \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.38, size = 0, normalized size = 0.00 \[\int \left (d \cot \left (f x +e \right )\right )^{n} \left (a +b \tan \left (f x +e \right )\right )^{m}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d \cot {\left (e + f x \right )}\right )^{n} \left (a + b \tan {\left (e + f x \right )}\right )^{m}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (d\,\mathrm {cot}\left (e+f\,x\right )\right )}^n\,{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^m \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________